package org.jsola.contract.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;
import org.jsola.core.dto.BaseDTO;

import javax.validation.constraints.NotNull;

import static org.jsola.contract.example.ContractVariableExample.E_CONTENT;
import static org.jsola.contract.example.ContractVariableExample.E_CONTRACT_ID;
import static org.jsola.contract.example.ContractVariableExample.E_VARIABLE_ID;
import static org.jsola.contract.example.ContractVariableExample.M_CONTENT_MAX;
import static org.jsola.contract.example.ContractVariableExample.M_CONTRACT_ID_NOT_NULL;
import static org.jsola.contract.example.ContractVariableExample.N_CONTENT;
import static org.jsola.contract.example.ContractVariableExample.N_CONTRACT_ID;
import static org.jsola.contract.example.ContractVariableExample.N_VARIABLE_ID;

/**
 * 合同关联模板变量
 *
 * @author JanusMix
 */
@EqualsAndHashCode(callSuper = true)
@ApiModel(description = "新增【合同关联模板变量】的参数")
@Data
public class ContractVariableAddDTO extends BaseDTO {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(notes = N_CONTRACT_ID, example = E_CONTRACT_ID, required = true)
    @NotNull(message = M_CONTRACT_ID_NOT_NULL)
    private Long contractId;

    @ApiModelProperty(notes = N_VARIABLE_ID, example = E_VARIABLE_ID)
    private Long variableId;

    @ApiModelProperty(notes = N_CONTENT, example = E_CONTENT)
    @Length(max = 1000, message = M_CONTENT_MAX)
    private String content;


}

